[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FAPPEND IEXP1,SEXP,IEXP2,IEXP3

 Function
  Use channel IEXP1 to open file SEXP in append mode with access
  mode IEXP2 and share mode IEXP3
  (valid channels = 0 - 7 [0 is used for script questionnaires])
  (valid access modes = O_RD, O_WR, O_RW [should use O_RW])
  (valid share modes = S_DN, S_DR, S_DW, S_DB)

 Syntax
  FAPPEND chan,file,am,sm

   chan  - An integer expression with the channel to use for the file
           (0 through 7).
   file  - A string expression with the file specification to open.
   am    - An integer expression with the desired access mode for the file.
   sm    - An integer expression with the desired share mode flags for
           the file.

 Remarks
  This statement allows a PPL application to open a file for append
  access.  Often you need to add information to an existing file without
  destroying the existing information in the file.  FCREATE completely
  destroys the file being opened if it already exists, and FOPEN will
  simply position you at the beginning of the file where you would
  overwrite data.  This statement will allow you to add the necessary
  information to the end of a file without destroying the file or any
  existing information in the file.  The chan parameter must be 0 through
  7; 0 is reserved for the answer file when a PPL script questionnaire is
  in use but is available for all other applications.  However, it is
  recommended you avoid channel 0 unless you really need to open 8 files
  at once.  The am parameter should be one of the following constants:

   O_RD   open with read access
   O_WR   open with write access
   O_RW   open with read/write access

  Note that the FAPPEND statement actually requires O_RW access; whatever
  you specify doesn't really matter as it will be overridden by PPL, but
  you must specify it to maintain compatibility with the FCREATE and FOPEN
  statements.  The sm parameter should be one of the following constants:

   S_DN   deny none sharing
   S_DR   deny read sharing
   S_DW   deny write sharing
   S_DB   deny both sharing

  Also, if the file specified doesn't exist, it is automatically created.

 Examples
  FAPPEND 1,"C:\PCB\MAIN\PPE.LOG",O_RW,S_DB
  FPUTLN 1,"Ran "+PPENAME()+" on "+STRING(DATE())+" at "+STRING(TIME())
  FCLOSE 1

See Also: FCLOSE FCREATE FOPEN FREWIND
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson